INCLUDE_FLAGS = -I. -I../include -I../
CFLAGS	      = $(INCLUDE_FLAGS) -Wall

ifeq ($(arch),)
CC			  = gcc
AR			  = ar
endif

AFLAGS		  = -r

TARGET = libfilter.a

SOUCE_FILES = $(wildcard *.c)
OBJS = $(patsubst %.c,%.o,$(SOUCE_FILES))

%.o : %.c %.h
	$(CC) -c $(CFLAGS) $< -o $@

%.o : %.c
	$(CC) -c $(CFLAGS) $< -o $@

$(TARGET): $(OBJS)
	$(AR) $(AFLAGS) $(TARGET) $(OBJS)

.PHONY:clean
clean:
	$(RM) $(TARGET) $(OBJS)
